import request from '@/utils/request'

export function edit(data) {
  return request({
    url: 'api/warnConf/edit',
    method: 'post',
    data
  })
}

export function appSelectPages(data) {
  return request({
    url: 'api/warnConf/appSelectPages',
    method: 'get',
    data
  })
}
export function add(data) {
  return request({
    url: 'api/warnConf/add',
    method: 'post',
    data
  })
}

export function addAppWarnConf(data) {
  return request({
    url: 'api/warnConf/addAppWarnConf',
    method: 'post',
    data
  })
}
export function del(data) {
  return request({
    url: 'api/warnConf/del',
    method: 'delete',
    data
  })
}

export function getUserList() {
  return request({
    url: 'api/warnConf/getUserList'
  })
}

export function getEditWarnConf(pkId) {
  return request({
    url: 'api/warnConf/getEditWarnConf?pkId=' + pkId,
    method: 'get'
  })
}

export function validateParam(data) {
  return request({
    url: 'api/warnConf/validateParam',
    method: 'post',
    data
  })
}
export default { edit, del, add, getUserList, getEditWarnConf, addAppWarnConf, validateParam }
